package com.uranus.auth.auth.controller;


import com.uranus.auth.auth.request.user.*;
import com.uranus.auth.auth.service.UserService;
import com.uranus.common.VO.Result;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author ybx
 * @since 2018-12-21
 */
@RestController
@RequestMapping("/auth")
public class AuthController {
    @Autowired
    UserService userService;

    @PostMapping("/login")
    @ApiOperation(value = "登录 sss")
    public Result login(@RequestBody LoginRequest req) {
        return userService.login(req);
    }

    @PostMapping("/register")
    @ApiOperation(value = "注册")
    public Result register(@RequestBody RegisterRequest req) {
        return Result.buildSuccess();
    }





}
